/*
 * jrouter.h
 *
 *  Created on: Dec 8, 2010
 *      Author: fify
 */

#ifndef JROUTER_H_
#define JROUTER_H_

#include "device.h"
#include <sstream>

using std::ostringstream;

namespace CncrVDevice
{

class VJRouter : public VRouter
{
public:
	void generate_code(int pos, string &code);

	virtual ~VJRouter()	{}

private:
	/*
	 * 令JConfig进入cli的状态之后调用该函数！
	 * Addition: Incomplete, so set it to private.
	 */
	int add_interface_ex(string &cmd, void *config);
	void gen_route_code(VCmdRoute *cmd, ostringstream &oss);
	void gen_interface_code(VCmdInterface *cmd, ostringstream &oss);
	void get_itfname_by_mac(string &name, string mac, void *config);
	void do_add_interface_ex(string &cmd, void *config);
};

} // End of namespace.

#endif /* JROUTER_H_ */
